package week06member.Personcmp;

import java.util.Random;

public class Test {
    public static void main(String[] args){
        Person[] personArray = new Person[10];
        Random rdn = new Random();
        for(int i=0;i<personArray.length;i++){
            personArray[i]=new Person("Person"+i,rdn.nextInt(10),200);
        }
        for (int i=0;i<personArray.length;i++){
            System.out.println(personArray[i].getName()+""+personArray[i].getHeight()+""+personArray[i].getWeight());
        }
        AbstractPersonCmp cmp = new PersoncmpByHeight();
        cmp.sort(personArray);

         System.out.println("over");
        for (int i=0;i<personArray.length;i++){
            System.out.println(personArray[i].getName()+""+personArray[i].getHeight()+""+personArray[i].getWeight());
        }

    }
}
